"""Run your agent in order to play online games.

This script requires three parameters: host, port and code. e.g.:
$ python run_client.py localhost 5672 your_code

To test your agent, the major modifications you need to make are:
1. import your own agent class
2. instantiate your agent
3. pass it to a 'Client'

The code looks like:

from your_folder.your_file import YourAgent

omega = YourAgent()
client = Client(args.host, args.port, args.code, TEAM, CAPTAIN, omega)
client.run()
"""
import argparse

from core.service.client import Client
from myAI.my_agent import myAgent

TEAM, CAPTAIN = 'LGD.DK', '程恺'


def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('host', help='server host')
    parser.add_argument('port', help='server port')
    parser.add_argument('code', help='your team code')
    args = parser.parse_args()

    alpha = myAgent()
    client = Client(args.host, args.port, args.code, TEAM, CAPTAIN, alpha)
    client.run()


if __name__ == '__main__':
    main()
